﻿<Serializable()> _
Public Class EubicacionVenta

#Region "           Atributos                       "
    Private _idUbicacion As Int32
    Private _descUbicacion As String
    Private _Eubigeo As Eubigeo
    Private _estado As String
    Private _descEstado As String
    Private _direccion As String
    Private _idUsuario As Int32
#End Region

#Region "           Propiedades                     "
    Public Property idUbicacion() As Int32
        Get
            Return _idUbicacion
        End Get
        Set(ByVal value As Int32)
            _idUbicacion = value
        End Set
    End Property
    Public Property descUbicacion() As String
        Get
            Return _descUbicacion
        End Get
        Set(ByVal value As String)
            _descUbicacion = value
        End Set
    End Property
    Public Property Eubigeo() As Eubigeo
        Get
            Return _Eubigeo
        End Get
        Set(ByVal value As Eubigeo)
            _Eubigeo = value
        End Set
    End Property
    Public Property estado() As String
        Get
            Return _estado
        End Get
        Set(ByVal value As String)
            _estado = value
        End Set
    End Property
    Public Property descEstado() As String
        Get
            Return _descEstado
        End Get
        Set(ByVal value As String)
            _descEstado = value
        End Set
    End Property
    Public Property direccion() As String
        Get
            Return _direccion
        End Get
        Set(ByVal value As String)
            _direccion = value
        End Set
    End Property
    Public Property idUsuario() As Int32
        Get
            Return _idUsuario
        End Get
        Set(ByVal value As Int32)
            _idUsuario = value
        End Set
    End Property
#End Region

#Region "           Propiedades Avanzadas           "

#End Region

#Region "           Contructores                    "
    Public Sub New()

    End Sub
    Public Sub New(ByVal idUbicacion As Int32, ByVal descUbicacion As String)

    End Sub
    Public Sub New(ByVal idUbicacion As Int32, ByVal descUbicacion As String, ByVal ubigeo As String, ByVal departamento As String, _
                   ByVal provincia As String, ByVal distrito As String, ByVal estado As String)
        Me.idUbicacion = idUbicacion
        Me.descUbicacion = descUbicacion
        _Eubigeo = New Eubigeo(ubigeo, departamento, provincia, distrito)
        Me.estado = estado
        Me.descEstado = IIf(estado = 1, "HABILITADO", "DESHABILITADO")
        Me.direccion = _Eubigeo.descripcionUbigeo
    End Sub
#End Region

End Class
